package player.ui.controlbar;

import java.awt.Point;
import java.awt.Rectangle;

import javax.swing.JWindow;

import player.PS;

public class ControlBarFrame extends JWindow{

	private static final long serialVersionUID = -4825885861601310106L;
	ControlBar controlFramePanel;
	public ControlBarFrame(){
		super(PS.videoFrame);
		controlFramePanel=new ControlBar();
		setContentPane(controlFramePanel);
		pack();
	}
	
	public void locationRelateToVideoFrame() {
		Rectangle videoFrameRec=PS.videoFrame.getBounds();
		Point  p=new Point();
		p.x=videoFrameRec.x+videoFrameRec.width/2-getWidth()/2;
		p.y=videoFrameRec.y+videoFrameRec.height+PS.config.videoBarDistance;
		
		setLocation(p);
		
	}
	
}
